/**
 * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see https://ckeditor.com/legal/ckeditor-oss-license
 */

CKEDITOR.editorConfig = function( config ) {
	config.toolbarGroups = [
		{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
		// { name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
		// { name: 'editing', groups: [ 'find', 'selection', 'spellchecker', 'editing' ] },
		{ name: 'forms', groups: [ 'forms' ] },
		{ name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
		{ name: 'paragraph', groups: [ 'list', 'indent', 'align', 'bidi', 'paragraph' ] },
		// { name: 'links', groups: [ 'links' ] },
		{ name: 'insert', groups: [ 'insert' ] },
		// { name: 'styles', groups: [ 'styles' ] },
		{ name: 'colors', groups: [ 'colors' ] },
		{ name: 'tools', groups: [ 'tools' ] },
		{ name: 'others', groups: [ 'others' ] },
		{ name: 'about', groups: [ 'about' ] }
	];
	config.enterMode = CKEDITOR.ENTER_BR;//（去掉baiBR）
	config.shiftEnterMode = CKEDITOR.ENTER_P;//(去掉P)
	config.fillEmptyBlocks=false;
	config.removePlugins = 'elementspath';
	config.removeButtons = 'Source,Save,Templates,Find,Scayt,Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,CopyFormatting,RemoveFormat,Indent,Outdent,Blockquote,BidiLtr,BidiRtl,Language,Link,Unlink,Anchor,Flash,HorizontalRule,Smiley,PageBreak,Iframe,Styles,ShowBlocks,About,Format,Font,FontSize,Image';
	//上传图片窗口用到的接口
	config.filebrowserImageUploadUrl = '/api/common/ueditor/getUploadPasterImageUrl';
	config.filebrowserUploadUrl ='/api/common/ueditor/getUploadPasterImageUrl';
	
	// 使上传图片弹窗出现对应的“上传”tab标签
	config.removeDialogTabs ='image:advanced;link:advanced';
  
	//粘贴图片时用得到
	config.extraPlugins ='uploadimage,ccmsconfighelper,kityformula';
	config.uploadUrl ='/api/common/ueditor/getUploadPasterImageUrl';
	config.allowedContent = true;
	// plugins
	CKEDITOR.config.contentsCss = '/exam/ckeditor/plugins/jdmath/mathquill-0.10.1/mathquill.css';

};
